<script setup lang="ts">
import CrowdOptimizationContent
  from "~/contentScripts/views/wxt/SuperOptimization/KeywordPromotion/CrowdOptimizationContent.vue";
import KeywordsOptimizationContent
  from "~/contentScripts/views/wxt/SuperOptimization/KeywordPromotion/KeywordPromotionUnitContent/KeywordsOptimizationContent.vue";
import ProvincialOptimizationContent
  from "~/contentScripts/views/wxt/SuperOptimization/KeywordPromotion/ProvincialOptimizationContent.vue";

const props = defineProps({
  campaignIds: {
    type: Array,
    default: () => [],
  },
  adgroupIds:{
    type: Array,
    default: () => [],
  },
});
const tabs = [
  {
    title: '关键词优化',
    component: KeywordsOptimizationContent,
  },
  {
    title: '人群优化',
    component: CrowdOptimizationContent,
  },
  {
    title: '省级优化',
    component: ProvincialOptimizationContent,
  }
]
const activeKey = ref(0);
</script>

<template>
  <a-tabs v-model:activeKey="activeKey">
    <a-tab-pane v-for="(tab,index) in tabs" :key="index" :tab="tab.title">
      <div style="min-height: 700px;display: flex;flex-direction: column;">
        <component :is="tab.component" :campaignIds="campaignIds" :adgroupIds="adgroupIds"></component>
      </div>
    </a-tab-pane>
  </a-tabs>
</template>

<style scoped>

</style>
